local sk__zhenhun = fk.CreateSkill {

  name = "sk__zhenhun",

  tags = {},

}



sk__zhenhun:addEffect("active", {
  name = "sk__zhenhun",
  mute = true,
  card_num = 0,
  target_num = 0,
  prompt = "#sk__zhenhun",
  can_use = function(self, player)
    return player:usedSkillTimes(sk__zhenhun.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  on_use = function(self, room, effect)
    local player = effect.from
    player:broadcastSkillInvoke(sk__zhenhun.name)
    room:notifySkillInvoked(player, sk__zhenhun.name, "big")
    local targets = room:getOtherPlayers(player)
    room:doIndicate(player.id, table.map(targets, Util.IdMapper))
    for _, target in ipairs(targets) do
      room:setPlayerMark(target, "@@sk__zhenhun-phase", 1)
    end
  end,
})

sk__zhenhun:addEffect("invalidity", {
  name = "#sk__zhenhun_invalidity",
  invalidity_func = function(self, from, skill)
    return from:getMark("@@sk__zhenhun-phase") > 0 and
        not skill:hasTag(Skill.Compulsory, true) and
        skill:isPlayerSkill(from)
  end
})

sk__zhenhun:addEffect("prohibit", {
  name = "#sk__zhenhun_prohibit",
  prohibit_use = function(self, player, card)
    return player:getMark("@@sk__zhenhun-phase") > 0 and card and card.name == "peach" and not player.dying
  end,
})

return sk__zhenhun
